import { request } from '@pkg/request/src';

export enum Api {
  page = '/busCompany/page',
  companyList = '/busCompany/list',
  get = '/busCompany/get',
  add = '/busCompany/save',
  update = '/busCompany/update',
  remove = '/busCompany/remove',
  rechargeAmount = '/busCompany/rechargeAmount',
}

export const companyList = (params) =>
  request.get(
    { url: Api.companyList, params },
    {
      errorMessageMode: 'none',
      successMessageMode: 'none',
    },
  );

export const get = (params) =>
  request.get(
    {
      url: Api.get,
      params: params,
    },
    { errorMessageMode: 'none', successMessageMode: 'none' },
  );
export const rechargeAmount = (params) =>
  request.post(
    {
      url: Api.rechargeAmount,
      params: params,
    },
    { errorMessageMode: 'none', successMessageMode: 'none' },
  );
